@extends('Layout/personBase')

@section('title', '商品评论')

@section('css')
		<link href="{{asset('Home/css/appstyle.css')}}" rel="stylesheet" type="text/css">
@endsection

@section('right')		
	@if (session('eval'))
		<script>
			alert("{{session('eval')}}");
		</script>
	@endif

	<div class="user-comment">
		<!--标题 -->
		<div class="am-cf am-padding">
			<div class="am-fl am-cf"><strong class="am-text-danger am-text-lg">发表评论</strong> / <small>Make&nbsp;Comments</small></div>
		</div>
		<hr/>
		@foreach ($evaluate as $v)

			<div class="comment-main">
				
				<div class="comment-list">
					<div class="item-pic">
						<a href="#" class="J_MakePoint">
							<img src="{{$v->goods_pic}}" class="itempic">
						</a>
					</div>

					<div class="item-title">

						<div class="item-name">
							<a href="#">
								<p class="item-basic-info">{{$v->goods_name}}</p>
							</a>
						</div>
						<div class="item-info">
							<div class="info-little">
								<span>{{$v->goods_specification}}</span>
							</div>
							<div class="item-price">
								价格：<strong>{{$v->unit_price}}元</strong>
							</div>										
						</div>
					</div>
					<div class="clear"></div>
					<div>
					
					<form action="{{url('/Home/evaluateGoods')}}" method="post">
						{{csrf_field()}}
						<input type="hidden" name="goods_id" value="{{$v->gid}}">
						<input type="hidden" name="detail_id" value="{{$v->id}}">
						<div class="item-comment">
							<textarea placeholder="请写下对宝贝的感受吧，对他人帮助很大哦！" name="comment"></textarea>
						</div>
						
						<div class="item-opinion">
							<li><input type="radio" name="evaluate" value="1">好评</li>
							<li><input type="radio" name="evaluate" value="2">中评</li>
							<li><input type="radio" name="evaluate" value="3">差评</li>
						</div>
						<div class="filePic">
							<div>
								<button type='submit' class="am-btn am-btn-danger">发表评论</button>
							</div>	
							
						</div>
					</form>
					</div>
				</div>										
			</div>
			
		@endforeach
	</div>


@endsection
